package echat.future.cn.echat.my.utils;

import android.text.TextUtils;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * Created by 86936 on 2018/7/4.
 *
 * @QQ 869360026
 */

public class PhoneUtils {
    public static boolean isMobile0(String str){
        if(TextUtils.isEmpty(str))
            return false;
        if(str.length()!=11)
            return false;
        String regex = "^0?1[0-9]{10}$";
        Pattern pattern = Pattern.compile(regex);
        Matcher matcher = pattern.matcher(str);
        return matcher.matches();
    }

    public static boolean isPass(String pass){
        if(pass.equals("")){
            return false;
        }
        if(pass.length()<6 || pass.length()>16){
            return false;
        }
        return true;
    }
}
